package com.decent.entity.common;


import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.io.Serializable;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Message implements Serializable {

    private static final long serialVersionUID = -1369948390563179472L;

    //{status:0,result:"",data:{}};
    /**
     * 状态码
     */
    private Integer errorCode;
    /**
     * 消息内容
     */
    private String errorMsg;
    /**
     * 消息所携带的一组数据
     */
    private Object data;

    public Message(Integer status, String result, Object data) {
        this.errorCode = status;
        this.errorMsg = result;
        this.data = data;
    }

    public Message(Integer status, String result) {
        this.errorCode = status;
        this.errorMsg = result;
    }

    public Message(String result) {
        this.errorMsg = result;
    }

    public Message(Integer status) {
        this.errorCode = status;
    }

    public Message() {

    }

}
